import cv2
import numpy as np

lena=cv2.imread("3\\lena_color.jpg")
lena = cv2.resize(lena, (256, 256))

lena2 = lena.copy()

# mask = np.random.randint(0, 256, (140, 140, 3), dtype=np.uint8)
lena2[60:200, 60:200] = np.random.randint(0, 256, (140, 140, 3), dtype=np.uint8)

lena3 = cv2.bitwise_xor(lena, lena2)

cv2.imshow("lena", lena)
cv2.imshow("lena2", lena2)
# cv2.imshow('lena3', lena3)
cv2.waitKey(0)
cv2.destroyAllWindows()

lena4 = cv2.bitwise_xor(lena2, lena3)
cv2.imshow('lena4', lena4)
cv2.waitKey(0)
cv2.destroyAllWindows()

